package com.support.android.designlibdemo.activity;

import android.os.Bundle;
import android.os.PersistableBundle;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;

import com.support.android.designlibdemo.R;



/**
 * Created by Administrator on 2015/11/10.
 */
public abstract class ToorBarActivity extends AppCompatActivity{

    protected Toolbar mToolbar;
    abstract int setContentLayout();

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(setContentLayout());
        mToolbar= (Toolbar) findViewById(R.id.toolbar);
        setSupportActionBar(mToolbar);
        ActionBar bar=getSupportActionBar();
        bar.setDefaultDisplayHomeAsUpEnabled(true);
       // bar.setHomeAsUpIndicator(R.drawable.ic_menu);
        bar.setDisplayHomeAsUpEnabled(true);
    }
}
